// 防抖函数封装
// https://zhuanlan.zhihu.com/p/72363385
function debounce (func, wait = 1000) {
  let timeout
  return function (event) {
    clearTimeout(timeout)
    timeout = setTimeout(() => {
      func.call(this, event)
    }, wait)
  }
}
export {debounce}
